// import store from '@/store'
import request from '@/utils/request'

export function login(data) {
  return request({
    method: 'post',
    url: '/sys/login',
    data
  })
}

// 获取用户基本资料
export function getUserBaseInfo() {
  return request({
    method: 'post',
    url: '/sys/profile'
    // 传token方式1-在接口单独传token
    // headers: {
    //   Authorization: store.state.user.token
    // }
  })
}
// 获取员工基本信息
export function getEmplyeeBaseInfo(id) {
  return request({
    method: 'GET',
    url: `/sys/user/${id}`
  })
}

export const getUserDetailById = getEmplyeeBaseInfo
